<f:subview 
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
  xmlns:nxp="http://nuxeo.org/nxweb/pdf">
<c:if test="#{countRows}">
  <c:forEach var="row" items="#{layout.rows}">
    <c:if test="#{not row.properties.isHidden}">
      #{layoutColumnCounter.increment()}
    </c:if>
  </c:forEach>
</c:if>
<c:if test="#{not countRows}">

  <c:if test="#{showListingHeader and layout.properties.showListingHeader}">

    <nxl:layoutColumn>
      <c:if test="#{not layoutColumn.properties.isHidden}">
        <c:choose>
          <c:when test="#{layoutColumn.properties.useFirstWidgetLabelAsColumnHeader}">
            <c:if test="#{!layoutColumn.widgets[0].translated}">
              <nxp:cell horizontalAlignment="center" verticalAlignment="middle">#{layoutColumn.widgets[0].label}</nxp:cell>
            </c:if>
            <c:if test="#{layoutColumn.widgets[0].translated}">
              <nxp:cell horizontalAlignment="center" verticalAlignment="middle">#{messages[layoutColumn.widgets[0].label]}</nxp:cell>
            </c:if>
          </c:when>
          <c:otherwise>
            <nxp:cell></nxp:cell>
          </c:otherwise>
        </c:choose>
      </c:if>
    </nxl:layoutColumn>

  </c:if>

  <nxl:layoutColumn>
    <c:if test="#{not layoutColumn.properties.isHidden}">
      <nxp:cell horizontalAlignment="left" verticalAlignment="middle">
        <nxl:layoutColumnWidget>
          <nxl:widget widget="#{widget}" value="#{value}" />
        </nxl:layoutColumnWidget>
      </nxp:cell>    
    </c:if>
  </nxl:layoutColumn>

</c:if>
</f:subview>